TOP GEAR (SNES) STATIC CORE - CUMULATIVE FINDINGS
=================================================

Updated: 2026-08-09
Source: Release 1.2.0 Windows source, exact USA ROM
ROM SHA-256: ca9889f17f184b3d99a2eaaa82af73e366f03ed00313fdd369e5e023b208e788

PURPOSE AND UPDATE RULE
-----------------------

This is the cumulative plain-text inventory requested for the static core. When
a test proves a new meaning and commentary is added beside the relevant core
code, the finding must also be added here. The static-findings-sync test checks
the current semantic-comment anchors and important addresses.

Autogenerated comments that merely decode an opcode (for example, LDA or STA)
are instruction listings and are not repeated individually. This file records
semantic ownership, data meanings, tested behavior, architectural boundaries,
and known fail-closed gaps.

EVIDENCE RULES
--------------

PROVED means an exact ROM table, a direct static data-flow, or controlled
headless branches plus reader/writer tracing establish the meaning.

CANDIDATE means a value correlated with a branch but could still represent
position, animation, timers, road state, or some other related state. Candidate
bytes are not given gameplay names until another independent test separates the
possible meanings.

The framebuffer identifies screens and visible outcomes. It is not by itself a
speed, fuel, car, track, or AI-state oracle.

CURRENT STATIC EXECUTION CORE
-----------------------------

The current frontend uses the broad Version 22 generated W65C816 surface under
the Version 23 event-order scheduler, with Version 24-27 observation, frontend,
snapshot, and audio layers. The normal runtime does not decode opcodes at
runtime. One generated function call executes one statically selected W65C816
instruction.

Generated execution includes ordinary ROM, ROM re-entry shards, executable
WRAM, interrupt dispatch, and ROM-installed low-WRAM interrupt trampolines.
The event-order scheduler models NTSC frame/scanline order, refresh stalls,
NMI/IRQ, auto-joy, DMA/HDMA, completed frames, and functional PPU state. It does
not claim exact physical 5A22 wait timing for every bus cycle.

The Version 24 run-for-seconds entry point is reset-oriented and initializes the
event timeline on every call. It must not be used to continue a loaded snapshot.
The frontend and snapshot tests continue through the idempotent Version 27
advance-frame path.

HOOK SYSTEM
-----------

INSTRUCTION_BEFORE and INSTRUCTION_AFTER bracket one exact generated W65C816
instruction. The address is the original PBR:PC. BUS_READ and BUS_WRITE report
data and MMIO accesses, not compiled instruction fetches. CHECKPOINT occurs
after the completed framebuffer is hashed at V=240. FRONTIER reports fail-closed
execution boundaries.

A BEFORE callback can stop before an instruction. An AFTER callback stops after
that instruction and its scheduler accounting. A BUS stop aborts that access
and is intended for diagnostics. Callback recursion is suppressed. A callback
must not destroy or reset the core.

Headless hook readiness proved paired instruction events, bus events, one frame
checkpoint, distinct P1/P2 physical input state, stop before instruction 100,
and deterministic resume to the same first frame.

BUS, INPUT, AND INTERRUPT OWNERSHIP
----------------------------------

Both controllers enter through SNES serial ports $4016/$4017 or auto-joy result
registers $4218-$421F. Frontend code only supplies physical controller masks;
the ROM NMI handler at $00:EC1A-$00:EC5A owns the game-visible copies.

PROVED CONTROLLER FIELDS:

  $0010-$0011  P1 current held 16-bit mask, copied from $4218
  $0012-$0013  P2 current held 16-bit mask, copied from $421A
  $0014-$0015  P1 new/unconsumed-input latch
  $0016-$0017  P2 new/unconsumed-input latch

  $00:EC3A     writer of P1 current held mask
  $00:EC43     writer of P1 derived latch
  $00:EC4A     writer of P2 current held mask
  $00:EC53     writer of P2 derived latch

The latch formula implemented by the ROM is:

  current & (~previous | previous_latch)

Headless Test 04 proves P1 Right=$0100, Left=$0200, Down=$0400, Up=$0800
and independently proves P2 Right=$0100 from matched late-race snapshots.

CPU-internal reads in $4000-$43FF do not update the 5A22 MDR. Ordinary reads,
writes, and open-bus reads do. The exact cartridge has no SRAM or coprocessor;
the corresponding unmapped ranges are open bus.

PLAYER NAME AND TEXT ENTRY
--------------------------

Headless Test 02 uses blank, A, and B branches and records the generated writer
for every differing WRAM byte.

  $005E        wrapped 0..7 name/password entry index
  $0060        selected keyboard-grid ASCII character
  $0068-$006F  shared eight-byte name/password staging and display buffer
  $1F86-$1F8D  persistent Player 1 name

  $0F:9578     stores the selected ASCII character at $0060
  $0F:9583     commits one character to the staging buffer
  $0F:9B7F-$0F:9B91
                copies persistent Player 1 name to $0068-$006F for display
  $0F:9B82     first staging-word writer on that display/readback path
  $0F:9BCF-$0F:9BE0
                copies the edited staging buffer to persistent Player 1 storage
  $0F:9BD1     first persistent Player 1 name-word writer

The staging buffer is reused and is not persistent storage. Nearby storage at
$1FA3 is a Player 2 candidate, but it remains deliberately unlabeled until a
controlled two-player name test proves it.

OPPONENT / CPU DISPLAY NAMES
----------------------------

ROM $0D:C47B-$0D:C512 contains 19 fixed records of eight bytes:

  SIMON, RITCHIE, ASH, GREGS, CHRIS, ADE, T C, TIM, SIZ, MARK,
  BERNI, TONY, MATT, ROB, IAN, JAMES, SHAUN, PAUL, COMPUTER

$0F:88A2 and $0F:89B2 use opponent_index * 8 to read the selected record and
copy its four words through $0D:C481,X into $0068-$006F for rendering. This
proves opponent display-name selection, not AI behavior.

PASSWORDS AND PERSISTENCE
-------------------------

Top Gear uses passwords rather than battery-backed SRAM. The frontend SRAM APIs
therefore intentionally report zero bytes and never create fake save RAM.

The exact 21-record password table is ROM $0D:C513-$0D:C5BA. Each record is
eight bytes. $0F:9426 and its re-entry equivalent compare all eight staging
bytes at $0068-$006F with a selected record.

  AMATEUR:      MOONBATH, GEARBOX, CAR PARK, ROAD HOG, EMULATOR,
                ANALYSER, HORIZONS
  PROFESSIONAL: FOUR MEG, LEGEND, THEWORLD, LETSRACE, ALCHEMY,
                A LOOPER, SEASONAL
  CHAMPIONSHIP: EDUCATED, OILCLOTH, WRECKAGE, CARACOLE, EPYLLION,
                GLUCAGON, KEELSON

The seven entries in each skill row select South America, Japan, Germany,
Scandinavia, France, Italy, and the United Kingdom.

TRACK / COURSE DATA
-------------------

The 32 proved course-name records begin at ROM $0F:AC93 (LAS VEGAS) and end at
$0F:AFAD (STONEHENGE), in eight regions of four races:

  USA:           LAS VEGAS, LOS ANGELES, NEW YORK, SAN FRANCISCO
  SOUTH AMERICA: RIO, MACHU PICCHU, CHICHEN ITZA, RAIN FOREST
  JAPAN:         TOKYO, HIROSHIMA, YOKOHAMA, KYOTO
  GERMANY:       MUNICH, COLOGNE, BLACK FOREST, FRANKFURT
  SCANDINAVIA:   STOCKHOLM, COPENHAGEN, HELSINKI, OSLO
  FRANCE:        PARIS, NICE, BORDEAUX, MONACO
  ITALY:         PISA, ROME, SICILY, FLORENCE
  UK:            LONDON, SHEFFIELD, LOCH NESS, STONEHENGE

The exact live WRAM track ordinal has not yet been proved. A later test must use
different password/region branches or matched setup snapshots and trace the
course-name reader plus the race loader before labeling a track field.

MENUS AND SETUP DATA LANDMARKS
------------------------------

  $0F:A6B3 / $0F:A6FD  1 PLAYER / 2 PLAYERS
  $0F:A6BF / $0F:A735  SKILL LEVEL
  $0F:A6CD and others  COUNTRY
  $0F:A6D7 / $0F:A6E3  PLAY GAME / OPTIONS
  $0F:A7E2              GEAR SELECT
  $0F:A8D6              CAR TYPE
  $0F:AC44              PLAYER SETUP
  $0F:AC53 / $0F:B4BC  PLAYER 1 labels
  $0F:AC5E / $0F:B4C9  PLAYER 2 labels
  $0F:AFFB              PRESS START
  $0F:B0F2              CONTROL METHOD

These are ROM UI/data ownership landmarks. They are not automatically live menu
selection variables.

GRAPHICS, PPU, DMA, AND DISPLAY
-------------------------------

BGMODE $2105 selects Mode 1 menu/HUD/tiled artwork or Mode 7 race-road
rendering. BG map, character, and scroll registers are $2107-$2114. Mode 7
matrix and centre registers are $211A-$2120. OAM/OBJ supplies cars and race-HUD
sprites. VRAM, CGRAM, and OAM are filled heavily through DMA/HDMA.

The functional renderer implements Mode 1, the Mode 7 affine road path,
offset-per-tile behavior, color math, windowing, and OBJ priority. Exact PPU
fetch-pipeline history is a separate certification boundary.

ROM labels near $0F:A6ED/$0F:A70B/$0F:A874 identify SPEED display data;
$0F:A8BB identifies FUEL; the $0F:B0CB area contains GEARS/ACCEL control text.
These addresses do not prove live speed, fuel, or gear variables.

RACE CHARACTERIZATION SO FAR
----------------------------

Test 03 proves the scripted 59-second point is an active split-screen race, not
the car-selection screen. Neutral versus Right changes the framebuffer and 17
WRAM bytes. Only the controller copies are currently named. The other offsets
remain candidates:

  $0071, $0072, $0083, $0084, $009C, $01F3, $01F5,
  $01F7-$01F9, $07CA, $1E7E-$1E7F, $1E82-$1E83

Test 04 improves the method by reaching the race once, saving one snapshot, and
reloading it for each branch. Results after 180 frames:

  P1 Right: 15 WRAM differences, frame FNV B21E98212FAE829E
  P1 Left:  14 WRAM differences, frame FNV 19B300535CDDEC06
  P1 Down:   2 WRAM differences, frame FNV 19B300535CDDEC06
  P1 Up:     2 WRAM differences, frame FNV 19B300535CDDEC06
  P2 Right:  2 WRAM differences, frame FNV 19B300535CDDEC06

At this point in the race, Left/Down/Up and P2 Right leave the rendered frame
identical to neutral even though the raw masks are proved in WRAM. This may be
because the selected control layout or race state does not act on those inputs;
the test does not infer more.

SNAPSHOT SYSTEM
---------------

A Version 27 snapshot contains the complete S-CPU/core structure, Full Static
S-SMP state, all 64 KiB of ARAM, and S-DSP state. Core and audio payloads are
independently hashed. ROM and host callback pointers are not serialized. The
audio FIFO is cleared after load so stale host PCM is not replayed.

The existing corruption tests reject trailing data and missing files. Test 04
adds a late-race save/load test using the same advance-frame API as the frontend.
Two neutral restores produce byte-identical WRAM and identical frame FNV after
180 frames, even after intervening direction branches.

A test that called the reset-oriented Version 24 duration runner after loading a
snapshot caused the event master clock to restart at 186 while restored audio
was already later. Full Static audio correctly rejected this as "master clock
moved backwards." This was an API misuse discovered by the new test, not a
frontend snapshot failure.

AUDIO AUTHORITY AND KNOWN FRONTIERS
-----------------------------------

Production audio is the project-owned Full Static AOT lane (STATIC-APU). The real ROM IPL and
program upload feed the S-SMP through APUIO. The later driver executes only at
generated exact SPC700 PCs with expected opcodes. Unknown PCs, opcode mismatches,
unemitted forms and writes into compiled code fail closed. There is no automatic
interpreter or alternate audio backend. S-DSP executes its fixed 32-phase signal
path and emits BRR/envelope/noise/echo stereo PCM.

The current source no longer contains the retired hybrid implementation directory,
compatibility stub, backend selector/state, APUIO bridge, hybrid build option or
runtime AOT-learning switch. The static S-SMP/S-DSP source retains its upstream
licence/provenance as required attribution; it is compiled directly as the sole
static signal path, not loaded or selected as a hybrid backend.

The repaired authority closes three proved ROM-derived helpers: PC=$1124-$1139
(A/turbo), PC=$11AF-$11C4 (collision/rival), and PC=$0D7C-$0D82 (later mixed
driving). The last helper is exactly `DA 4A DA 4C A2 33 6F`; live evidence proved
entry at $0D7C with opcode $DA, and $0D83 was already generated as the following
routine. Whole-command closure subsequently raises the production map to 1,148
exact S-SMP PCs, 115 opcode forms and 2,261 protected instruction bytes.

Fresh Windows exploration originally passed the 174,993 ms boundary, then stopped
deterministically at unknown S-SMP PC=$122F, expected opcode $FF, actual $CD.
The mixed route stops after frame 10,704 with its last completed frame at
178,105 ms and S-CPU endpoint $00:B856; independent 356-second and 180-second
requests reproduce identical totals. Extended hard-left and hard-right routes
also reach PC=$122F around 178 seconds, so the boundary is not specific to one
steering pattern. Initial ARAM contains a helper-shaped 22-byte sequence at
$122F-$1244. It is command $12 in the 29-entry pointer table at $10A7. The proved
routine copies eight bytes from $1349-$1350 into DSP voice-6 registers $60-$67,
sets direct-page voice mask $2F bit $40, and returns. The complete command-table
CFG contains 278 reachable instructions / 520 bytes. Regeneration added 169 exact
PCs and 311 protected bytes; no unresolved target or overlapping decode remains.

Finite AOT coverage therefore remains intentionally open. A new S-SMP PC or
executable-ARAM mutation must create a verified static authority epoch; it must
never restore a runtime learner/interpreter.

TEST INVENTORY / CURRENT RESULT
-------------------------------

  Hook readiness: instruction pairing, bus hooks, stop/resume, checkpoints PASS
  Headless 01: reset -> title -> options                           PASS
  Headless 02: blank/A/B name entry and persistent Player 1 name  PASS
  Headless 03: active-race neutral/Right differential             PASS
  Headless 04: snapshot input matrix and repaired A/turbo branch   PASS
  Gameplay 05: turbo and hard-left/right routes through old gaps   PASS
  Gameplay 06: mixed manual drive through prior 174,993 ms frontier      PASS
  Gameplay 07: former $122F frontier / mixed race completion             PASS at 356 seconds
  Gameplay 08: hard-left/right 200 s and native two-player 140 s         PASS
  Headless 05: automatic Las Vegas closed-loop race, continuous X         PASS
  Password table: all 21 exact records                            PASS
  Track table: all 32 course names in order                       PASS
  Snapshot basic corruption/round-trip checks                     PASS

  Gameplay 07 receipt: docs/generated/STATIC-CORE-HEADLESS-TEST-07-AUDIO-FRONTIER-122F.json
  Gameplay 08 receipt: docs/generated/STATIC-CORE-HEADLESS-TEST-08-COMMAND-CLOSURE.json
  Headless 05 clean-race receipt: docs/generated/STATIC-CORE-HEADLESS-TEST-05-CLEAN-AUTOMATIC-RACE.json

AUTOMATIC FIRST-RACE FINDINGS (2026-08-10)
------------------------------------------

The new `topgear-static-core-headless-05-clean-race` executable selects AUTO
on Gear Select, then uses rendered-road feedback rather than a prerecorded
left/right movie. During every active race frame P1 holds X; its only combined
inputs are X+Left, X+Right, and X+A. A is triggered once after the start line
for each live lap transition. The Las Vegas run advances the P1 lap byte
`$011E` through 0, 1, 2, and 3 before the RESULTS frame, consuming exactly the
three available nitros on laps 1, 2, and 3. The paired lower CPU view uses
`$0130` for the same observed lap progression.

Across both the prior manual/off-road evidence and this automatic controlled
run, `$011A + 1` matches the position rendered in P1's HUD/results, while
`$012C + 1` matches the lower CPU view. The automatic run finishes 5th; the
RESULTS framebuffer independently prints PLAYER in the fifth row. X was never
released after race start. The static RESULTS frame begins at 179,300 ms from
reset and the WAV continues for two seconds beyond it.

The test saves both race-start and finish snapshots. It reloads the finish
snapshot and verifies the framebuffer hash, lap byte, and final-place byte
before reporting PASS. It also records the race-only 32,040 Hz stereo PCM,
per-second telemetry, and the finish framebuffer. Full Static audio completes
with no AOT or S-DSP failure and no fallback.

The revised car/boost branch selects the blue Weasel in the lower-right Car
Type slot. The project performance table lists it third after Cannibal and
Razor (Razor and Weasel share the same stated 220 km/h top speed). Requested
nitro laps are 2, 3, and 5. Las Vegas has only three laps, so A fires on laps 2
and 3 and the third nitro remains unused; no A input occurs on lap 1 and lap 5
is unreachable. X remains held throughout the race. This branch finishes P1
8th and the lower-screen COMPUTER rival 6th. Both positions are independently
visible as the eighth and sixth rows of the saved RESULTS framebuffer. The
finish snapshot reload, static audio checks, and 2-second post-results PCM tail
pass at 182,583 ms from reset.

The current boost-only revision keeps the same automatic Weasel route and
changes only the three A windows. Rendered-road geometry and lap-relative phase
now trigger A after lap 1's final corner (120,166 ms), on lap 2's longest
straight (132,316 ms), and after lap 2's final corner onto the start/finish
line (142,850 ms). The driver asserts the observed lap pattern 1/2/2 before it
can report PASS. P1 finishes 7th and the lower COMPUTER rival finishes 3rd;
the saved RESULTS framebuffer independently shows those rows. Continuous X,
finish-snapshot reload, Full Static audio, and the 88.371-second race WAV all
pass. The WAV includes a two-second results tail.

FINISH-ORDER TABLE AND VISIBLE-TRAFFIC FINDINGS (2026-08-10)
-----------------------------------------------------------

Five independently saved completed Las Vegas snapshots prove that WRAM
`$1F62-$1F75` is a 20-byte permutation of racer IDs. The first ten bytes
`$1F62-$1F6B` match the ten names drawn on the RESULTS screen in exact row
order. The complete ID mapping is:

  0 PLAYER       1 COMPUTER     2 SIMON        3 RITCHIE
  4 ASH          5 GREGS        6 CHRIS        7 ADE
  8 T C          9 TIM         10 SIZ         11 MARK
 12 BERNI       13 TONY        14 MATT        15 ROB
 16 IAN         17 JAMES       18 SHAUN       19 PAUL

The displayed top-ten point awards remain 20, 15, 12, 10, 8, 6, 4, 3, 2,
and 1. For example, the repeated geometry-timed finish snapshot contains
IDs `03 13 01 0A 0C 05 00 0D 02 04` in its first ten slots, matching the
visible rows RITCHIE, PAUL, COMPUTER, SIZ, BERNI, GREGS, PLAYER, TONY,
SIMON, and ASH.

The generated core now carries this label at the actual instructions. The
loop at `$0F:8957-$0F:895E` initializes `$1F62-$1F75` to racer IDs 0 through
19. The following `$0F:8967-$0F:8988` loop uses each order entry as an index
into cumulative championship points `$1F4E-$1F61` and swaps adjacent entries
while ordering them. The `$0F:8B6E-$0F:8BB3` loop consumes all 20 sorted IDs while building
RESULTS data; saved frames prove that its first ten order entries are the ten
displayed rows. `$0F:86E9-$0F:86FF` separately scans the permutation for IDs
0 and 1, writes their slot indexes to `$1FF8+ID*2`, and increments both low
bytes to make those immediate outputs one based. Those staging bytes are not
equated with the independently observed live HUD fields `$011A` and `$012C`.

The headed traffic experiment read the core's native 544-byte OAM rather
than assigning an unproved WRAM byte to nearby cars. In the saved one-player
Las Vegas race-start frame, P1's visible car occupies OAM entries 3-14. Other
objects entering a narrow near-road band in the upper viewport are usable as
a conservative visible-traffic signal for steering and boost gating. This is
a route-specific screen-space heuristic: it does not identify general car
slots, collision state, AI steering, AI speed, or catch-up logic. The static
video source carries that limitation beside the OBJ/OAM renderer.

COMMENTED SOURCE INDEX
----------------------

  static-recomp/include/topgear_static_recomp.h
    Current hook contract and static execution API boundaries.

  static-recomp/src/topgear_audio_backend.c
    Full Static-only production audio boundary; no alternate runtime backend.

  static-recomp/static-audio/topgear-bapu-aot/sc_static_apu.cpp
    Fail-closed synchronization and closed $0D7C/$1124/$11AF/$122F command helpers.

  static-recomp/src/topgear_machine.c
    MDR/open-bus behavior, input ownership, APUIO production join.

  static-recomp/src/topgear_ppu_dma.c
    PPU register and DMA/HDMA ownership map.

  static-recomp/src/topgear_snapshot.c
    Complete core/APU snapshot payload, hashing, callback/FIFO exclusions,
    and no-SRAM/password ownership.

  static-recomp/src/topgear_v22_scheduler.c
    Uniform instruction hook boundary for ROM, re-entry, WRAM, and interrupts.

  static-recomp/src/topgear_v22_video.c
    Graphics/gameplay display ownership, UI/data landmarks, and the scoped
    one-player OAM visible-traffic observation.

  static-recomp/generated/v22/topgear_v22_group_03E1.c
  static-recomp/generated/v22_reentry/topgear_v22_reentry_group_03E1.c
    PLAYER/COMPUTER scan of the 20-entry racer-order permutation.

  static-recomp/generated/v22/topgear_v22_group_03E2.c
  static-recomp/generated/v22_reentry/topgear_v22_reentry_group_03E2.c
    Finish-order initialization/sort and RESULTS table consumer.

  static-recomp/src/topgear_v23_scheduler.c
    Event-order/audio rendezvous and reset-oriented duration-run boundary.

  static-recomp/generated/topgear_v22_interrupt_dispatch.c
    P1/P2 current input and derived latch fields at $0010-$0017.

  static-recomp/generated/v22/topgear_v22_group_03E1.c
    Password-table reader at $0D:C513.

  static-recomp/generated/v22/topgear_v22_group_03E2.c
    Opponent-name table readers at $0F:88A2 and $0F:89B2.

  static-recomp/generated/v22/topgear_v22_group_03E5.c
    Name/password edit index, keyboard character, staging-buffer operations,
    deletion, commit, and password comparison.

  static-recomp/generated/v22/topgear_v22_group_03E6.c
    Persistent Player 1 name readback and commit paths.

Equivalent semantic comments are also present in the generated re-entry shards
where those paths can resume mid-block.

NEXT HIGH-VALUE TESTS
---------------------

1. Controlled two-player A/B names to prove or reject $1FA3 as P2 storage.
2. Password-selected regions to locate the live region and track ordinal.
3. Race snapshots with controlled acceleration windows to identify speed only
   after writer/reader traces and motion/frame derivatives agree.
4. Car-selection snapshots that branch all four cars before race entry.
5. Fuel and nitro branches once the $1124 static-audio coverage gap is closed.
6. Stationary, trailing, and leading rival branches before labeling AI state.

AUDIO HYBRID-RESIDUE AUDIT (2026-08-10)
-----------------------------------------

The Version 26 evidence/oracle/handbook archives confirm that the former hybrid
driver was a development reference bridge used while the native S-DSP scaffold
was incomplete. Version 27 does not compile or link that engine. A complete
source/runtime audit nevertheless found live interfaces that still read the old
disconnected scaffold mirrors.

The public DSP-register API now reads the live Full Static S-DSP (power-on FLG
$6C=$E0), and DSP status now reports the live exact phase, S-SMP/DSP clock and
PCM count. Static audio master-clock mirrors commit only after successful sync
or APUIO access. A failed frame-boundary audio rendezvous can no longer publish
a completed video checkpoint. Dead v13_hybrid instance state, three absent
hybrid execution declarations, and four uncompiled obsolete audio/scheduler
source files were removed from the focused current core.

The prior clean MSVC build and 20-test CTest run established the hybrid-removal
baseline. The later command-CFG repair closes PC=$122F/opcode $CD without adding
an interpreter or fallback. Updated build, CTest and extended gameplay results
are recorded after regenerating the 1,148-PC authority. Full details are in
AUDIO-STATIC-CORE-AUDIT.md and generated/V27-SMP-COMMAND-CLOSURE.json.

RACE TELEMETRY AND WHITE CAR FINDINGS (2026-08-10)
---------------------------------------------------

The removed pre-release race harness selected the white Sidewinder. Car Type begins
on the upper-left red Cannibal; one Down press selects the lower-left white
Sidewinder and A confirms it. This replaces the earlier Right+Down route to the
lower-right blue Weasel.

The top-speed report uses the game's own HUD input. WRAM `$1E5A-$1E5B` is P1's
signed raw speed. At S-CPU `$00:CE63-$00:CEBD`, the game clips negative values,
multiplies raw speed by 15 for mph or 24 for km/h through the Mode 7 multiply
unit, shifts right ten bits, and divides the result into the three visible
decimal digits. `$1FF6/$1FB0` choose the same unit branch. The race harness
recorded the maximum converted value separately while completed-lap byte
`$011E` was 0, 1, and 2, producing top speed for laps 1, 2, and 3.

WRAM `$1EAE-$1EAF` is the live race-tick counter. The P1 HUD routine at
`$00:D1B3` prefers frozen finish tick `$1F26-$1F27`; while that word is
negative, `$00:D1B8` falls back to `$1EAE`. It divides ticks by 60 for whole
seconds and uses the 0-59 remainder to index ROM digit tables at
`$00:D6B6/$00:D72E`, equivalent to `floor(frame * 100 / 60)`. The harness
reported the frozen in-game finish value exactly in `MM'SS"CC` form, plus its
raw tick count. This is distinct from host milliseconds since reset.

Cars passed is counted from proved one-based live place `$011A+1`. Every
decrease in position number adds the number of forward places gained. A later
loss does not erase prior passes, so passing the same opponent again counts as
another forward gain. This is intentionally a pass-event metric, not a claim
that unique rival identities have been mapped in live race memory.

COMPLETE 32-COURSE NAME-RECORD MAP (2026-08-10)
------------------------------------------------

These are ROM course-name records in display/progression order. CPU addresses
are followed by exact 512-KiB LoROM file offsets. They identify course-name
data, not the separate road-geometry structures.

  01 USA / Las Vegas              `$0F:AC93` / `0x07AC93`
  02 USA / Los Angeles            `$0F:ACAD` / `0x07ACAD`
  03 USA / New York               `$0F:ACC9` / `0x07ACC9`
  04 USA / San Francisco          `$0F:ACE2` / `0x07ACE2`
  05 South America / Rio          `$0F:AD00` / `0x07AD00`
  06 South America / Machu Picchu `$0F:AD15` / `0x07AD15`
  07 South America / Chichen Itza `$0F:AD31` / `0x07AD31`
  08 South America / Rain Forest  `$0F:AD4F` / `0x07AD4F`
  09 Japan / Tokyo                `$0F:AD6C` / `0x07AD6C`
  10 Japan / Hiroshima            `$0F:AD82` / `0x07AD82`
  11 Japan / Yokohama             `$0F:AD9C` / `0x07AD9C`
  12 Japan / Kyoto                `$0F:ADB5` / `0x07ADB5`
  13 Germany / Munich             `$0F:ADCB` / `0x07ADCB`
  14 Germany / Cologne            `$0F:ADE4` / `0x07ADE4`
  15 Germany / Black Forest       `$0F:ADFE` / `0x07ADFE`
  16 Germany / Frankfurt          `$0F:AE1D` / `0x07AE1D`
  17 Scandinavia / Stockholm      `$0F:AE39` / `0x07AE39`
  18 Scandinavia / Copenhagen     `$0F:AE54` / `0x07AE54`
  19 Scandinavia / Helsinki       `$0F:AE71` / `0x07AE71`
  20 Scandinavia / Oslo           `$0F:AE8C` / `0x07AE8C`
  21 France / Paris               `$0F:AEA2` / `0x07AEA2`
  22 France / Nice                `$0F:AEB9` / `0x07AEB9`
  23 France / Bordeaux            `$0F:AECF` / `0x07AECF`
  24 France / Monaco              `$0F:AEE9` / `0x07AEE9`
  25 Italy / Pisa                 `$0F:AF01` / `0x07AF01`
  26 Italy / Rome                 `$0F:AF16` / `0x07AF16`
  27 Italy / Sicily               `$0F:AF2B` / `0x07AF2B`
  28 Italy / Florence             `$0F:AF42` / `0x07AF42`
  29 United Kingdom / London      `$0F:AF5B` / `0x07AF5B`
  30 United Kingdom / Sheffield   `$0F:AF74` / `0x07AF74`
  31 United Kingdom / Loch Ness   `$0F:AF90` / `0x07AF90`
  32 United Kingdom / Stonehenge  `$0F:AFAD` / `0x07AFAD`

CHAMPIONSHIP POINTS STORAGE AND UPDATE (2026-08-10)
----------------------------------------------------

`$1F4E-$1F61` is the 20-byte cumulative championship-points table, indexed by
racer ID 0-19. At `$0F:887F`, the first ten finishing slots provide racer IDs.
For each rank, `$0F:888A` reads that racer's current total, `$0F:888D` adds the
ROM award byte at `$0E:8024+rank`, and `$0F:8891` writes the updated total back.
The exact award table at CPU `$0E:8024-$0E:802D` / file `0x070024-0x07002D` is
`20, 15, 12, 10, 8, 6, 4, 3, 2, 1`. The `$0F:8967-$0F:8988` sort then orders
the 20 racer IDs at `$1F62-$1F75` by those totals, and `$0F:8B75` reads the same
table for World Ranking display. This replaces the earlier cautious label
"comparison bytes" with the now-proved championship-points meaning.

GAME AUDIO LOCATION AUDIT (2026-08-10)
---------------------------------------

There are no host WAV soundtrack or sound-effect assets in the static core.
All game-owned audio originates in the exact ROM and is executed from ARAM:

* ROM file `0x06E000-0x06FCD8` (CPU `$0D:E000-$0D:FCD8`) is decompressed through
  S-CPU `$00:8032` into the 12,497-byte packet at WRAM `$7E:2000-$7E:50D0`.
* Its 12,489-byte payload installs at ARAM `$0800-$38C8`, entry `$0800`.
  `$0800-$1348` contains the shared driver and command bodies; parameter,
  sound-effect and music-sequence/control data continue at `$1349-$38C8`.
* The 29-command dispatch table is ARAM `$10A7-$10E0`; bounded command bodies
  are `$10E1-$1348`. Confirmed effects include turbo `$1124-$1139` with data
  `$113A-$1141`, collision/rival `$11AF-$11C4` with data `$11C5-$11CC`, and
  command `$12` voice-6 setup `$122F-$1244` using `$1349-$1350`.
* Live DSP DIR is `$8A`, so the 23 populated source-directory entries occupy
  ARAM `$8A00-$8A5B`. BRR sample bodies occupy `$8B00-$E7FF`. Music and sound
  effects share this sample bank; S-SMP commands and sequences decide how each
  source is pitched, enveloped and played.
* The completed Las Vegas snapshot proves thirteen exact byte-copy blocks:

    ARAM `$8B00-$8DEF` <- ROM `0x03B52A-0x03B819`
    ARAM `$8DF0-$90FF` <- ROM `0x03A578-0x03A887`
    ARAM `$9100-$9D8F` <- ROM `0x03A891-0x03B520`
    ARAM `$9D90-$A07F` <- ROM `0x038D6D-0x03905C`
    ARAM `$A080-$ADBF` <- ROM `0x03982F-0x03A56E`
    ARAM `$ADC0-$B57F` <- ROM `0x039066-0x039825`
    ARAM `$B580-$BB7F` <- ROM `0x03DB39-0x03E138`
    ARAM `$BB80-$BF0F` <- ROM `0x027608-0x027997`
    ARAM `$BF10-$C56F` <- ROM `0x024E9B-0x0254FA`
    ARAM `$C570-$D21F` <- ROM `0x023D89-0x024A38`
    ARAM `$D220-$DF9F` <- ROM `0x03E99B-0x03F71A`
    ARAM `$DFA0-$E1EF` <- ROM `0x0279A1-0x027BF0`
    ARAM `$E1F0-$E7FF` <- ROM `0x026FEF-0x0275FE`

The live race sets ESA `$6D=$39` and EDL `$7D=$0A`, making ARAM
`$3900-$88FF` the 20-KiB echo buffer. Changes there between race start and
finish are generated echo history, not missing or duplicated soundtrack data.
The static-audio implementation lives under
`static-recomp/static-audio/topgear-bapu-aot`: S-SMP AOT lookup/dispatch files
execute driver code, DSP files decode BRR/envelopes/noise/echo/mixing, and
`sc_static_apu.cpp` joins that hardware state to deterministic PCM. Those are
hardware semantics; the actual music/effect bytes remain ROM/ARAM-owned.

HEADLESS TEST 06 - COMPLETE USA COUNTRY (2026-08-16)
----------------------------------------------------

The complete-country test starts from reset, selects automatic transmission
and the white Sidewinder, and supplies every action through controller port 1.
It does not patch WRAM.  The low-fuel-use white car completed the USA as:

  Las Vegas:     1st, CPU rival 5th, 3 laps, 182 mph maximum, 3 boosts,
                 20 cumulative points
  Los Angeles:   4th, CPU rival 2nd, 3 laps, 156 mph maximum, 2 boosts,
                 30 cumulative points
  New York:      2nd, CPU rival 3rd, 3 laps, 166 mph maximum, 3 boosts,
                 45 cumulative points
  San Francisco: 4th, CPU rival 3rd, 6 laps, 176 mph maximum, 3 boosts,
                 55 cumulative points

The saved RESULTS snapshots confirm that $1F4E is PLAYER's single-byte
cumulative points entry: the observed sequence 20, 30, 45, 55 is exactly the
ROM award table applied to finishes 1st, 4th, 2nd and 4th.  $1F62-$1F6B
continued to hold the ten displayed racer IDs at each RESULTS page.

The visual controller also bounded the earlier OAM commentary.  The narrow
non-P1 upper-view OAM band improved Las Vegas and qualified Los Angeles, but
roadside-object false positives made it counterproductive on New York and San
Francisco.  New York qualified by sampling framebuffer asphalt closer to P1
(rows 55-90, 108-148 dead-zone) with the OAM avoidance disabled.  San Francisco
qualified using the original horizon band (rows 40-70, 119-137 dead-zone) with
the same heuristic disabled.  This is why the core video comment continues to
label OAM entries 3-14 and the traffic band as route-specific display evidence.

The test deliberately continued 3,600 frames/60 seconds beyond the fourth
RESULTS screen.  The game ranked PLAYER 2nd in the USA, displayed
"CONGRATULATIONS / YOU QUALIFIED FOR THE NEXT COUNTRY", issued AMATEUR password
MOONBATH, previewed Rio de Janeiro, Brazil as a four-lap race, and entered
that race.  The final post-USA snapshot remained fully static-audio clean:
zero S-SMP AOT failures, zero static DSP failures, and automatic fallback off.

FIRST-EPOCH NMI CALLER-CONTEXT REPAIR (2026-08-16)
--------------------------------------------------

The native-mode NMI handler at `$0F:8000-$0F:806B` is callable while ordinary
game code owns any data-bank register (DBR) or direct-page register (D). Its
prologue pushes A/X/Y/D/DBR, then `TCD` establishes D=`$0000` and `PHK/PLB`
establishes DBR=`$0F` for the body. Its epilogue performs `PLB` and `PLD` before
restoring A/X/Y and executing `RTI`.

The earlier generated context table incorrectly copied the one Version 15
capture's DBR=`$0F` and D=`$0000` onto every handler instruction. A naturally
reached post-race/results NMI interrupted code with DBR=`$07` and therefore
failed closed at `$0F:8002` before the handler had an opportunity to save or
replace DBR. This looked like a frozen game because the frontend correctly
held the last valid frame after the core frontier.

`tg_require_context_masked` now expresses which caller registers are fixed at
each generated boundary without weakening E/M/X validation or the handler
body. The generator-owned contract is:

  `$0F:8000-$0F:800A`  DBR and D are inherited from interrupted code.
  `$0F:800B-$0F:800C`  DBR is inherited; D has become `$0000`.
  `$0F:800D-$0F:8066`  handler-owned DBR=`$0F`, D=`$0000` are exact.
  `$0F:8067`           DBR is restored; D is still `$0000`.
  `$0F:8068-$0F:806B`  DBR and D are both restored caller values.

The focused regression proves exact restoration for the observed DBR=`$07`,
D=`$0000` case and a deliberately stronger DBR=`$03`, D=`$1234` case. It also
mutates DBR inside the handler-owned body and proves the normal fail-closed
guard still rejects it. A 20,000-frame neutral-input trace from the saved race
start then executed 251,971,073 generated instructions, crossed 5,335 NMIs,
observed and restored 22 DBR=`$07` entries, and continued 11,272 frames beyond
the last such entry without a frontier. This covers the lightly used
post-race/non-finish transition that exposed the defect rather than stopping
at the formerly failing instruction.

STATIC AUDIO COMMAND CATALOGUE (RELEASE 1.2.0)
------------------------------------------------

Music and sound effects are separate command systems. APUIO0 selectors
`$01-$07` are all music. Race setup at
generated S-CPU `$00:817C-$00:81A0` reads `$1F06`, keeps its low two bits,
XORs them with 3, then adds 2. That produces exactly `$02`, `$03`, `$04`, or
`$05`, so these are the four race-music selectors. The common routine at
`$0F:8133-$0F:8159` clears APUIO0, performs the command-$18 driver handshake,
increments the caller's value and writes the resulting music selector. Its
callers at `$0F:858D` and `$0F:8563` supply `$05` and `$06`, proving menu/title-
side soundtrack selectors `$06` and `$07`. The `$0F:8675` caller supplies zero,
which the common routine increments to `$01`; S-SMP `$0A17-$0A24` doubles that
selector and resolves sequence `$13AB` from the table at `$1397`. The seven
sequence addresses are `$13AB`, `$13B3`, `$13BB`, `$13C3`, `$13CB`, `$13D3`,
and `$13DB` for selectors `$01-$07` respectively.

Each sequence address is an eight-byte descriptor, not a finished PCM track.
The descriptors select channel-pointer blocks beginning at `$13E3`, `$13F3`,
`$1403`, `$1413`, `$1423`, `$1433`, and `$1443`; those blocks lead to the
channel streams whose notes, instrument events, pattern calls and loops assemble
each complete soundtrack.

`topgear_recomp_music_command` is a narrow host-facing form of the same
S-CPU-to-S-SMP port-0 write. It accepts stop `$00` and the seven proved music
selectors. APUIO1 is a separate 29-command sound-effect/control dispatcher:
S-SMP `$1092-$10A3` indexes little-endian handler pointers at `$10A7-$10E0`.
The static-core catalogue records every table address and target entry. Commands `$05`
at `$1124` and `$0B` at `$11AF` are the gameplay-proved turbo and collision/
rival effects. Sixteen independently playable effect handlers produced static
PCM in isolated tests. `$02/$03` and `$0D/$0E` are parameterized setup/pitch
pairs; voice-mask controls, return-only entries, and the `$18` IPL reset are
documented but deliberately not played.

The first Music implementation made an invalid shortcut by writing a new
APUIO0 selector into the already-running opening-song driver state.  A later
reset-based repair still missed one important part of the real protocol: it ran
`$07:8000` with the cold-boot A=0 upload index for every track and changed only
the final selector at `$00:8077`.  That made Title correct but left `$02-$07`
using Title BRR/sample/instrument resources, producing incomplete arrangements.

The real protocol couples `selector-1` with `selector`.  `$07:8000` uses the
first value to index `$07:8164` and choose one of seven resource chains rooted at
`$07:8172`; only after that song-specific upload completes does the S-CPU write
the final APUIO0 selector.  Corrected `topgear_recomp_music_preview_prepare`
now replaces both values at the exact generated boundaries `$00:8064` and
`$00:8077`.  A ROM regression requires seven deterministic and distinct high-
ARAM (`$8900-$FFFF`) resource hashes, and the corrected race-song states are
validated against the saved live four-race campaign snapshots.

These command helpers remain static-core research and regression surfaces. The
release 1.2.0 Windows frontend deliberately has no Music Box, offline preview,
temporary WAV player or recorder. Production audio is generated live from the
running game by the same Full Static S-SMP/S-DSP authority.

RACE SOUND-EFFECT / ENGINE AUDIT (2026-09-04)
------------------------------------------------

The Linux audio explorer now has a race-SFX recorder in addition to the corrected
seven-song recorder. The recorder first performs the real Las Vegas race upload
chain, then stops music before isolating effects. Player 1 engine is one sampled
voice, not a set of separate RPM samples: command $02 starts DSP voice 4 and
command $03 retunes it from APUIO2/APUIO3. Race NMI computes that pitch as
max(signed WRAM $1E5E, 0) + $0400. Live manual-route traces show the pitch falling
at each gear change before rising again, proving the gearbox modifies the value
that drives pitch rather than switching samples.

Proved Player-1 race effects are boost $05, finish-line $07, tire/skid $0A and
collision $0B. Boost was captured from the real A-button input in the four-race
route; finish is bound to the lap-complete bit written by $05:E7B6-$05:E7DD;
skid and collision are bound to their NMI WRAM event sources and live traces.
Boost and skid use DSP voice 5; finish uses DSP voice 4. Player-2 mirrors are
$10/$12/$15/$16. $08/$09 and $13/$14 are panning variants of the finish sample
family. Driver effects $1A-$1D remain unmapped because no normal four-race
gameplay trigger has been proved.

The boost, skid and finish BRR sources are self-terminating, with END=1 and
LOOP=0. The earlier multi-second isolated recordings repeated because APUIO1 was
left asserted after the S-SMP acknowledgement, causing the level-sensitive
dispatcher to accept and key-on the same event again. The corrected one-shot
helper clears APUIO1 to $00 immediately after acknowledgement, verifies neutral
acknowledgement, and lets one BRR traversal end naturally. Active durations are
about 0.349 s for boost, 0.166 s for skid and 0.714 s for finish.

The deterministic race-SFX regression hashes boost, finish, skid, collision and
two engine pitches independently, requires zero Full Static AOT/DSP failures,
and requires a natural silent tail after the corrected discrete effects. The
automatic and manual engine WAVs replay captured live pitch timelines.
